<?php 
//encrypt($pwd);
//decrypt($pwd);

//公式杀码，杀掉每个位置开的数的相邻两个数，相差4的两个数
function gs_sm14($num){
	if($num>=0&&$num<=9){
		$n[0] = ($num+10-1)%10;
		$n[1] = ($num+10+1)%10;
		$n[2] = ($num+10-4)%10;
		$n[3] = ($num+10+4)%10;
		return $n ;
	}else{
		echo "不是0`9";
	}
}

//公式杀码，杀掉每个位置开的数的相差2的两个数，相差2的两个数
function gs_sm12($num){
	if($num>=0&&$num<=9){
		$n[0] = ($num+10-1)%10;
		$n[1] = ($num+10+1)%10;
		$n[2] = ($num+10-2)%10;
		$n[3] = ($num+10+2)%10;
		return $n ;
	}else{
		echo "不是0`9";
	}
}

//公式杀码，杀掉每个位置开的数的相差1的两个数，相差3的两个数
function gs_sm13($num){
	if($num>=0&&$num<=9){
		$n[0] = ($num+10-1)%10;
		$n[1] = ($num+10+1)%10;
		$n[2] = ($num+10-3)%10;
		$n[3] = ($num+10+3)%10;
		return $n ;
	}else{
		echo "不是0`9";
	}
}

//公式杀码，杀掉每个位置开的数的相差2的两个数，相差3的两个数
function gs_sm23($num){
	if($num>=0&&$num<=9){
		$n[0] = ($num+10-2)%10;
		$n[1] = ($num+10+2)%10;
		$n[2] = ($num+10-3)%10;
		$n[3] = ($num+10+3)%10;
		return $n ;
	}else{
		echo "不是0`9";
	}
}

//公式杀码，杀掉每个位置开的数的相差2的两个数，相差4的两个数
function gs_sm24($num){
	if($num>=0&&$num<=9){
		$n[0] = ($num+10-2)%10;
		$n[1] = ($num+10+2)%10;
		$n[2] = ($num+10-3)%10;
		$n[3] = ($num+10+3)%10;
		return $n ;
	}else{
		echo "不是0`9";
	}
}

//公式杀码，杀掉每个位置开的数的相差3的两个数，相差4的两个数
function gs_sm34($num){
	if($num>=0&&$num<=9){
		$n[0] = ($num+10-3)%10;
		$n[1] = ($num+10+3)%10;
		$n[2] = ($num+10-4)%10;
		$n[3] = ($num+10+4)%10;
		return $n ;
	}else{
		echo "不是0`9";
	}
}

//随机排列
function gs_sjpl(){
	$arr = array('0','1','2','3','4','5','6','7','8','9');
	 shuffle($arr);
	 return $arr;
}


?>